﻿using System;
using WEATHER.Components;

namespace WEATHER.Modules.MANAGEMENT.Pages
{
    public partial class DangerousWeatherSpider : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string mid = Request.QueryString["mid"];
            Response.Write("<div style='font-family: Tahoma, Arial; font-size: 9pt'>");
            Response.Write("<strong>BẮT ĐẦU:</strong><br /><br />");
            Response.Flush();

            WEATHER.Components.DangerousWeather.GetWeatherOnline(new Guid(mid), DangerousWeatherType.TTNH_BaoVaApThapNhietDoi);
            Response.Write("Đang xử lý: Bão và áp thấp nhiệt đới");
            Response.Flush();

            WEATHER.Components.DangerousWeather.GetWeatherOnline(new Guid(mid), DangerousWeatherType.TTNH_KhongKhiLanh);
            Response.Write("<br />Đang xử lý: Không khí lạnh");
            Response.Flush();

            WEATHER.Components.DangerousWeather.GetWeatherOnline(new Guid(mid), DangerousWeatherType.TTNH_NangNong);
            Response.Write("<br />Đang xử lý: Nắng nóng");
            Response.Flush();

            WEATHER.Components.DangerousWeather.GetWeatherOnline(new Guid(mid), DangerousWeatherType.TTNH_KhoHan);
            Response.Write("<br />Đang xử lý: Khô hạn");
            Response.Flush();

            WEATHER.Components.DangerousWeather.GetWeatherOnline(new Guid(mid), DangerousWeatherType.TVDB_ThongBaoLu);
            Response.Write("<br />Đang xử lý: Thông báo lũ");
            Response.Flush();

            WEATHER.Components.DangerousWeather.GetWeatherOnline(new Guid(mid), DangerousWeatherType.TVDB_ThongBaoCan);
            Response.Write("<br />Đang xử lý: Thông báo cạn");
            Response.Flush();

            WEATHER.Components.DangerousWeather.GetWeatherOnline(new Guid(mid), DangerousWeatherType.TVDB_ThongBaoXaNuocChongHan);
            Response.Write("<br />Đang xử lý: Thông báo báo xả nước chống hạn");
            Response.Flush();

            Response.Write("<br /><br /><strong>HOÀN THÀNH:</strong> Lúc " + DateTime.Now + ")</div>");
            Response.Flush();
        }
    }
}
